package qq;

import java.util.*;
class Complex{
    private int aa;
    private int bb;
    public Complex(int aa,int bb){
        this.aa=aa;
        this.bb=bb;
    }
    public Complex(Complex c){
        this.aa=c.getReal();
        this.bb=c.getImag();
    }
    public int getReal(){
        return aa;
    }
    public int getImag(){
        return bb;
    }
    @Override
    public String toString() {
        if (bb > 0) {
            return aa + "+" + bb + "i";
        } else if (bb < 0) {
            return aa + "" + bb + "i";
        } else {
            return aa + "";
        }
    }
    public void add(Complex c){
        this.aa+=c.aa;
        this.bb+=c.bb;
    }
    public void sub(Complex c){
        this.aa-=c.aa;
        this.bb-=c.bb;
    }
}
public class Main{
    public static void main(String args[]){
        Scanner cin=new Scanner(System.in);
        int r1=cin.nextInt();
        int i1=cin.nextInt();
        int r2=cin.nextInt();
        int i2=cin.nextInt();
        Complex c1 = new Complex(r1,i1);
        Complex c2 = new Complex(r2,i2);
        Complex c3 = new Complex(c1);
        c3.add(c2);
        System.out.println(c3);
        Complex c4 = new Complex(c1);
        c4.sub(c2);
        System.out.println(c4);
        cin.close();
    }
}